/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-05-04 11:21:24
 * @LastEditTime: 2022-05-04 11:56:18
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description: 
 */
import { PUSH_PERSON } from "../constant";
export default function person(preState = [{ id: '001', name: "小王", age: 18 }], action) {
  const { type, person } = action
  switch (type) {
    case PUSH_PERSON:
      return [person, ...preState]
    default:
      return preState
  }
}